<?php 
/* SVN FILE: $Id$ */
/* Vote Test cases generated on: 2009-05-23 23:05:50 : 1243137530*/
App::import('Model', 'Vote');

class VoteTestCase extends CakeTestCase {
	var $Vote = null;
	var $fixtures = array('app.vote', 'app.vote_log', 'app.vote_option');

	function startTest() {
		$this->Vote =& ClassRegistry::init('Vote');
	}

	function testVoteInstance() {
		$this->assertTrue(is_a($this->Vote, 'Vote'));
	}

	function testVoteFind() {
		$this->Vote->recursive = -1;
		$results = $this->Vote->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('Vote' => array(
			'id'  => 1,
			'vote_name'  => 'Lorem ipsum dolor sit amet',
			'start_time'  => '2009-05-23 23:58:50',
			'end_time'  => '2009-05-23 23:58:50',
			'can_multi'  => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida,phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam,vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit,feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
			'vote_count'  => 1
		));
		$this->assertEqual($results, $expected);
	}
}
?>